package com.szxy.hotel.service;

import com.szxy.hotel.entity.Consume;
import com.szxy.hotel.entity.Room;
import com.szxy.hotel.mapper.ConsumeMapper;
import com.szxy.hotel.mapper.RoomMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service("indexService")
public class IndexService {
    @Resource
    RoomMapper roomMapper;
    @Resource
    ConsumeMapper consumeMapper;
    public List<Room> findByPage1(int start, int size, String roomState1, String roomState2) {
        return roomMapper.findByPage1(start,size,roomState1,roomState2);
    }

    public List<Room> selectCount1(String roomState1, String roomState2) {
        return roomMapper.selectCount1(roomState1,roomState2);
    }

    public List<Consume> findByPage(int start, int size) {
        return consumeMapper.findByPage(start,size);
    }

    public List<Consume> selectCount() {
        return consumeMapper.selectCount();
    }

    public List<Room> findByPageSingle(int start, int size, String roomState1, String roomState2, String singleroom) {
        return roomMapper.findByPageSingle(start,size,roomState1,roomState2,singleroom);
    }

    public List<Room> selectCountSingle(String roomState1, String roomState2, String singleroom) {
        return roomMapper.selectCountSingle(roomState1,roomState2,singleroom);
    }
}
